USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0004_CREATE_TABLE]    Script Date: 11/25/2011 11:54:52 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0004_CREATE_TABLE]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0004_CREATE_TABLE]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0004_CREATE_TABLE]    Script Date: 11/25/2011 11:54:52 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[WASP_M0004_CREATE_TABLE]

AS
BEGIN
	if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[creditos_vigentes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	begin
	 drop table [dbo].[creditos_vigentes]
	end

	CREATE TABLE [dbo].[creditos_vigentes] (
		AGENCOLOC smallint,
		CRCREDITO	varchar(9),
		RUTTRABAJA varchar(10),
		FNACITRABA decimal(8,0),
		SEXOTRABAJ char(1),
		CRMONTO varchar(11),
		CRCUOTAS	numeric(2),
		CRTASA varchar(8),
		CRCLASE numeric(1),
		CRFECAPROB decimal(8,0),
		TIPO_TRABAJADOR varchar(1))
END

GO


